Bytecount Reporting
Hi,
I am trying to write an application that monitors traffic over an OpenVPN link - by using bytecount information from the management interface. However, after I telnet in, and enter "bytecount 1" (for 1 second updates), I find that the real-time bytecount updates are not really every second. They seem to be initially, but soon slow down (to an update every 5-10 seconds).
Is this expected, or a known issue?
Thanks!
Quoted 5 lines · On 17/03/10 20:46, [email protected]... wrote:
Hi,
I am trying to write an application that monitors traffic over an OpenVPN link - by using bytecount information from the management interface. However, after I telnet in, and enter "bytecount 1" (for 1 second updates), I find that the real-time bytecount updates are not really every second. They seem to be initially, but soon slow down (to an update every 5-10 seconds).
Is this expected, or a known issue?
Hi,
I'd say this is probably unexpected. But I'd like to know a little bit more about your setup. What kind of OS are you running OpenVPN?
It sounds like your OpenVPN process get lower priority somehow. But it could also be that it is dependent on the amount of traffic passing over the tunnel. I'll dig more into the code to see if there are some oddities there before concluding.
kind regards,
David Sommerseth
Hi,
I'm running OpenVPN (client) on Windows - connecting to a Linux Server. I am wondering if a value isn't reported if there is no traffic - that could be part of this (though it would be better to report information anyways).
Make sense?
Thanks!
... Russell
Quoted 1 line · David Sommerseth
Quoted 21 lines · On 17/03/10 20:46, [email protected]... wrote:
Quoted 5 lines
Hi,
I am trying to write an application that monitors traffic over an OpenVPN link - by using bytecount information from the management interface. However, after I telnet in, and enter "bytecount 1" (for 1 second updates), I find that the real-time bytecount updates are not really every second. They seem to be initially, but soon slow down (to an update every 5-10 seconds).
Is this expected, or a known issue?
Hi,
I'd say this is probably unexpected. But I'd like to know a little bit more about your setup. What kind of OS are you running OpenVPN?
It sounds like your OpenVPN process get lower priority somehow. But it could also be that it is dependent on the amount of traffic passing over the tunnel. I'll dig more into the code to see if there are some oddities there before concluding.
kind regards,
David Sommerseth
Quoted 5 lines · On 17/03/10 22:40, [email protected]... wrote:
Hi,
I'm running OpenVPN (client) on Windows - connecting to a Linux Server.
I'm presuming you're connecting to the management interface on the Linux server.
Quoted 1 line
I am wondering if a value isn't reported if there is no traffic - that could be part of this
I have a feeling this is the reality. As I don't see any timer alarms scheduled in the management part of the code. So I need to see this more in connection with the main part of the event loop code. But I believe this is the case.
Quoted 3 lines
(though it would be better to report information anyways).
Make sense?
Yeah, I can see your point. But isn't the information going to be rather useless if it hasn't changed? If there is no change, no need to dump the same info once again. What do you think?
kind regards,
David Sommerseth
Quoted 26 lines · David Sommerseth
Quoted 3 lines
Quoted 21 lines · On 17/03/10 20:46, [email protected]... wrote:
Quoted 5 lines
Hi,
I am trying to write an application that monitors traffic over an OpenVPN link - by using bytecount information from the management interface. However, after I telnet in, and enter "bytecount 1" (for 1 second updates), I find that the real-time bytecount updates are not really every second. They seem to be initially, but soon slow down (to an update every 5-10 seconds).
Is this expected, or a known issue?
Hi,
I'd say this is probably unexpected. But I'd like to know a little bit more about your setup. What kind of OS are you running OpenVPN?
It sounds like your OpenVPN process get lower priority somehow. But it could also be that it is dependent on the amount of traffic passing over the tunnel. I'll dig more into the code to see if there are some oddities there before concluding.
kind regards,
David Sommerseth
Hi,
All very good questions! Some thoughts, below.
Thanks for all your help!
... Russell
Quoted 1 line · David Sommerseth
Quoted 63 lines · On 17/03/10 22:40, [email protected]... wrote:
Quoted 5 lines
Hi,
I'm running OpenVPN (client) on Windows - connecting to a Linux Server.
I'm presuming you're connecting to the management interface on the Linux server.
Quoted 4 lines
Russell: No, on the local client (i.e. on Windows). This avoids having to send information over the link (=wasted bandwidth, and lower speed).
I am wondering if a value isn't reported if there is no traffic - that could be part of this
I have a feeling this is the reality. As I don't see any timer alarms scheduled in the management part of the code. So I need to see this more in connection with the main part of the event loop code. But I believe this is the case.
Quoted 5 lines
Russell: Understood - if it is please just let me know.
(though it would be better to report information anyways).
Make sense?
Yeah, I can see your point. But isn't the information going to be rather useless if it hasn't changed? If there is no change, no need to dump the same info once again. What do you think?
Quoted 1 line
Russell: I understand your point, but I'm also wanting to show transfer rate, and plot the data (which would be easiest if the data arrives uniformly). Not a huge issue, but I would to at least like to understand why this is the case. I guess if this is the way it works it should at least be captured in the documentation for the Management Interface, right?
kind regards,
David Sommerseth
Quoted 26 lines · David Sommerseth
Quoted 3 lines
Quoted 21 lines · On 17/03/10 20:46, [email protected]... wrote:
Quoted 5 lines
Hi,
I am trying to write an application that monitors traffic over an OpenVPN link - by using bytecount information from the management interface. However, after I telnet in, and enter "bytecount 1" (for 1 second updates), I find that the real-time bytecount updates are not really every second. They seem to be initially, but soon slow down (to an update every 5-10 seconds).
Is this expected, or a known issue?
Hi,
I'd say this is probably unexpected. But I'd like to know a little bit more about your setup. What kind of OS are you running OpenVPN?
It sounds like your OpenVPN process get lower priority somehow. But it could also be that it is dependent on the amount of traffic passing over the tunnel. I'll dig more into the code to see if there are some oddities there before concluding.
kind regards,
David Sommerseth
Quoted 20 lines · On 17/03/10 23:01, [email protected]... wrote:
Hi,
All very good questions! Some thoughts, below.
Thanks for all your help!
... RussellQuoted 1 line · David Sommerseth
Quoted 8 lines · On 17/03/10 22:40, [email protected]... wrote:
Quoted 5 lines
Hi,
I'm running OpenVPN (client) on Windows - connecting to a Linux Server.
I'm presuming you're connecting to the management interface on the Linux server.
Russell: No, on the local client (i.e. on Windows). This avoids having to send information over the link (=wasted bandwidth, and lower speed).
Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
I am wondering if a value isn't reported if there is no traffic - that could be part of this
I have a feeling this is the reality. As I don't see any timer alarms scheduled in the management part of the code. So I need to see this more in connection with the main part of the event loop code. But I believe this is the case.
Russell: Understood - if it is please just let me know.
Will do!
Quoted 9 lines
Quoted 7 lines
Quoted 3 lines
(though it would be better to report information anyways).
Make sense?
Yeah, I can see your point. But isn't the information going to be rather useless if it hasn't changed? If there is no change, no need to dump the same info once again. What do you think?
Russell: I understand your point, but I'm also wanting to show transfer rate, and plot the data (which would be easiest if the data arrives uniformly). Not a huge issue, but I would to at least like to understand why this is the case. I guess if this is the way it works it should at least be captured in the documentation for the Management Interface, right?
I'll definitely look into this! And if the behaviour is in need of network traffic, updating the docs is always the quickest and safest update we can do :)
kind regards,
David Sommerseth
Quoted 28 lines
Quoted 28 lines
Quoted 26 lines · David Sommerseth
Quoted 3 lines
Quoted 21 lines · On 17/03/10 20:46, [email protected]... wrote:
Quoted 5 lines
Hi,
I am trying to write an application that monitors traffic over an OpenVPN link - by using bytecount information from the management interface. However, after I telnet in, and enter "bytecount 1" (for 1 second updates), I find that the real-time bytecount updates are not really every second. They seem to be initially, but soon slow down (to an update every 5-10 seconds).
Is this expected, or a known issue?
Hi,
I'd say this is probably unexpected. But I'd like to know a little bit more about your setup. What kind of OS are you running OpenVPN?
It sounds like your OpenVPN process get lower priority somehow. But it could also be that it is dependent on the amount of traffic passing over the tunnel. I'll dig more into the code to see if there are some oddities there before concluding.
kind regards,
David Sommerseth
Quoted 6 lines · On Wednesday 17 March 2010, [email protected]... wrote:
I am trying to write an application that monitors traffic over an OpenVPN
link - by using bytecount information from the management interface. However, after I telnet in, and enter "bytecount 1" (for 1 second updates), I find that the real-time bytecount updates are not really every second. They seem to be initially, but soon slow down (to an update every 5-10 seconds).
Sorry for avoiding a direct answer to the question (David has already addressed that quite well), but I just wanted to tell you that you can get byte counts from OpenVPN's status file, ie the one you specify with "-- status". I used that in the past to monitor clients and traffic (it was actually a Munin plugin that read the file and collected the data). That said, it might not suit your requirements, but I thought I mentioned that just in case.
Signature · 1 line
D.
Hi Davide,
Yes, that makes sense - and I was going to do that originally, but I figured the real-time bytecount would result in less traffic (and text parsing). One question though ... you say "status file". Do you really mean a file? I can execute the status command over the Management Interface, but it's really a telnet type response, not in a file.
Thanks,
... Russell
Quoted 1 line · Davide Brini
Quoted 30 lines · On Wednesday 17 March 2010, [email protected]... wrote:
Quoted 7 lines
I am trying to write an application that monitors traffic over an OpenVPN link - by using bytecount information from the management interface. However, after I telnet in, and enter "bytecount 1" (for 1 second updates), I find that the real-time bytecount updates are not really every second. They seem to be initially, but soon slow down (to an update every 5-10 seconds).
Sorry for avoiding a direct answer to the question (David has already addressed that quite well), but I just wanted to tell you that you can get byte counts from OpenVPN's status file, ie the one you specify with "-- status". I used that in the past to monitor clients and traffic (it was actually a Munin plugin that read the file and collected the data). That said, it might not suit your requirements, but I thought I mentioned that just in case.
--
D.------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Quoted 9 lines · On Wednesday 17 March 2010, [email protected]... wrote:
Hi Davide,
Yes, that makes sense - and I was going to do that originally, but I
figured the real-time bytecount would result in less traffic (and text parsing). One question though ... you say "status file". Do you really mean a file? I can execute the status command over the Management Interface, but it's really a telnet type response, not in a file.
Yes, it's a real file. For example, you say
status /var/run/openvpn.status 10
and here's an example of what you get there (updated every 10 seconds, as per the above directive):
# cat /var/run/openvpn.status OpenVPN CLIENT LIST Updated,Wed Mar 17 22:56:47 2010 Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since CLIENT2,78.X.X.X:37298,742906,512337,Wed Mar 17 18:11:44 2010 DHOME,81.X.X.X:52424,3746,4900,Wed Mar 17 22:56:29 2010 ROUTING TABLE Virtual Address,Common Name,Real Address,Last Ref 10.180.0.4,CLIENT2,78.X.X.X:37298,Wed Mar 17 18:11:45 2010 10.180.0.9,DHOME,81.X.X.X:52424,Wed Mar 17 22:56:30 2010 GLOBAL STATS Max bcast/mcast queue length,0 END
Easily parsable with sed/awk/perl/whatever you like.
You can even choose among three different formats (all easily parsable) by using the "--status-version [n]" option (the above is format 1). See the man for the details.
Signature · 1 line
D.
Or you can user the radiusplugin from Ralf (http://www.nongnu.org/radiusplugin/) use a radius server and set an accounting interval.
Regards, Eike
Am 17.03.2010 23:38, schrieb Davide Brini:
Quoted 19 lines · On Wednesday 17 March 2010, [email protected]... wrote:
Quoted 9 lines
I am trying to write an application that monitors traffic over an OpenVPN
link - by using bytecount information from the management interface. However, after I telnet in, and enter "bytecount 1" (for 1 second updates), I find that the real-time bytecount updates are not really every second. They seem to be initially, but soon slow down (to an update every 5-10 seconds).Sorry for avoiding a direct answer to the question (David has already addressed that quite well), but I just wanted to tell you that you can get byte counts from OpenVPN's status file, ie the one you specify with "-- status". I used that in the past to monitor clients and traffic (it was actually a Munin plugin that read the file and collected the data). That said, it might not suit your requirements, but I thought I mentioned that just in case.